#ifndef PLUGININTERFACE_H
#define PLUGININTERFACE_H

#include <QApplication>
#include <QWidget>
#include <QIcon>

class PluginInterface
{
public:
    virtual ~PluginInterface(){}
    virtual void setConfig(QString conf) = 0;
    virtual QString getName() = 0;     //必要要实现
    virtual QIcon getIcon() = 0;
    virtual QWidget* creactUi(QWidget *parent = 0) = 0;
    virtual bool deleteUi() = 0;
    virtual bool isOpenUi() = 0;

};

//定义唯一的ID号
#define pluginInterface_iid "io.qt.dynamicplugin"
//向Qt元对象系统声明了这个接口
Q_DECLARE_INTERFACE(PluginInterface, pluginInterface_iid)

#endif // PLUGININTERFACE_H
